<%@ page language="java" import="java.util.*,JavaBean.*" pageEncoding="UTF-8"%>
<html>
<head>
<title>修改信息</title>
</head>

<body>
	<%
		request.setAttribute("two", "u");
	%>
	<h3>请选择要修改的图书</h3>
	<form action="BookServlet" method="post">
		<h3 style="text-align: center;">修改信息</h3>
		<table style="margin: auto;">
			<%
		if (request.getAttribute("all") != null) {
			if (request.getAttribute("all").equals("此图书馆里无书籍")) {
	%>
	<%=request.getAttribute("all")%>
	<%
		} else {
				List<two_data> list = new ArrayList<two_data>();
				list = (List<two_data>) request.getAttribute("all");
	%>
	<tr>
		<td style="width: 100px; font-size: 20px;">图书号</td>
		<td style="width: 180px; font-size: 20px;">图书名</td>
		<td style="width: 100px; font-size: 20px;">作者</td>
		<td style="width: 50px; font-size: 20px;">价格</td>
		<td style="width: 50px; font-size: 20px;">修改</td>
	</tr>
	<%
		for (two_data item : list) {
	%>
	<tr>
		<td><%=item.getBook_launch()%></td>
		<td><%=item.getBook()%></td>
		<td><%=item.getAuthor()%></td>
		<td><%=item.getPrice()%></td>
		<td><input type="radio" name="book1" value=<%=item.getBook() %>></td>
	</tr>
	<%
		}
			}
	%>
	<%
		}
	%>
		</table>
		<h3>请输入修改后的信息</h3>
		<table style="margin: auto;">
			<tr>
				<td>图书号</td>
				<td><input type="text" name="book_launch"></td>
			</tr>
			<tr>
				<td>图书名</td>
				<td><input type="text" name="book"></td>
			</tr>
			<tr>
				<td>作者</td>
				<td><input type="text" name="author"></td>
			</tr>
			<tr>
				<td>价格</td>
				<td><input type="text" name="price"></td>
			</tr>
			<tr>
				<td><input type="radio" checked value="u" name="two"
					style="display: none;"></td>
				<td></td>
			</tr>
			<tr>
				<td><input type="submit" value="提交">
				</td>
				<td><input type="reset" value="取消">
				</td>
			</tr>
		</table>
	</form>
</body>
</html>
